package java3_13;

import java.util.Scanner;

public class Application {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (true) {
            Person p = new Person();
            int price = 0;
            String x = "";
            System.out.println("请输入姓名：");
            p.name = scanner.next();
            System.out.println("请输入年龄：");
            p.age = scanner.nextInt();
            p.price();
            System.out.println("是否退出：");
            x = scanner.next();
            if (x.equals("y")){
                return;
            }
        }
    }
}
